import unittest
# 定义类
from parameterized import parameterized

from api.py_04_ihrm_login import ihrm_login
import common.py_05_tools


class hrm_login(unittest.TestCase):

    # 参数化
    @parameterized.expand(common.Tools_unitest.build_data_tools())
    def test01_login(self, case, jsonData, status_code, success, code, message):
        # 登录
        json_data = jsonData
        resp = ihrm_login.hrm_login(json_data)
        print(case, resp.json())
        common.Tools_unitest.assert_tools(self, resp, status_code, success, code, message)
